package com.itheima.health.controller.mobile;

import com.itheima.health.pojo.entity.Setmeal;
import com.itheima.health.pojo.result.Result;
import com.itheima.health.service.SetMealService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController("UserSetmealController")
@RequestMapping("/mobile/setmeal")
public class SetMealController {
    @Autowired
    private SetMealService setMealService;

    /**
     * 用户端--套餐详情查看
     * @param id
     * @return
     */
    @GetMapping("/findById")
    public Result userfindById(Integer id){
        log.info("用户端--套餐详情查看:{}",id);
        Setmeal setmeal = setMealService.userfindById(id);
        return new Result(true,null,setmeal);
    }
}
